package com.example.module_word.room

import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import com.example.module_word.search.entity.DictionaryResult
import com.fenghuajueli.libbasecoreui.BaseApplication

@Database(entities = [DictionaryResult::class], version = 1, exportSchema = false)
abstract class CourseDataBase : RoomDatabase() {

    abstract fun courseDao(): CourseDao

    companion object {
        private const val DBNAME = "cheeseenglish.db"
        val instance by lazy {
            Room.databaseBuilder(
                BaseApplication.getApplication(),
                CourseDataBase::class.java,
                DBNAME
            ).build()
        }
    }
}
